<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>JS调用Android</title>
    <style>
    #btn1{
        margin-top: 50px;
    }
    </style>
</head>
<body>
    <button type="button" id="btn1" onclick="fun()">调用安卓代码</button>
    <script>
        function fun(){
            ands.getData();
        }
    </script>
</body>
</html>